<?php

$host = 'localhost';
$username = 'root';
$password = '';
$dbName = 'b20';

mysql_connect($host, $username ,$password) or
            die(mysql_error().'<br>Unable to establish connection with MYSQL');
mysql_select_db($dbName) or
            die(mysql_error.'<br>Unable to select Database');


$select = "SELECT * FROM `practice`";
//$select .= " WHERE `passsword`='qwerty'";

$result = mysql_query($select) or die(mysql_error());

echo var_dump($result);

$rowsSelected =  mysql_num_rows($result);
//$lastId = mysql_insert_id();

echo "<h4>$rowsSelected Rows Selected</h4>";

echo '<pre>';
//while($ans = mysql_fetch_array($result)){
//while($ans = mysql_fetch_row($result)){
while($ans = mysql_fetch_assoc($result)){
  print_r($ans);
}
